<script id="order_list_tpl" type="text/html">
    {{# if(d != null && d.length > 0){ }}
    {{# for(var i = 0 ; i < d.length ; i++){ }}
        <div class="card0 m6">
            <div class="card-header">
                <ul class="pull-left">
                    <li><span>订单号：</span><p>{{d[i].orderNumber}}</p></li>
                    <li><span>昵&nbsp;&nbsp;&nbsp;&nbsp;称：</span><p>{{d[i].nickName}}</p></li>
                    <li><span>地&nbsp;&nbsp;&nbsp;&nbsp;址：</span><p>{{d[i].address}}</p></li>
                </ul>
                <ul class="pull-right">
                    <li><span>电话：</span><p>{{d[i].phone}}</p></li>
                    {{# if(d[i].status == 'UN_DISTRIBUTE' ){ }}
                    <li><span>状态：</span><p><i>已支付</i></p></li>
                    {{# } }}
                    {{# if(d[i].status == 'DISTRIBUTION' ){ }}
                    <li><span>状态：</span><p><i>已完成</i></p></li>
                    {{# } }}
                    {{# if(d[i].status == 'DISTRIBUTE' ){ }}
                    <li><span>状态：</span><p><i>等待接单</i></p></li>
                    {{# } }}
                    {{# if(d[i].status == 'ROB_DISTRIBUTE' ){ }}
                    <li><span>状态：</span><p><i>配送中</i></p></li>
                    {{# } }}
                    <li><span>总价：</span><p><em>￥{{d[i].amount}}</em></p></li>
                </ul>
            </div>
            <div class="card-content">
                <ul>
                    <li>
                        <a href="#"><img src="{{d[i].mainImage}}"></a>
                        <h3>{{d[i].pname}}</h3>
                        <p><span>{{d[i].spec != undefined ? d[i].spec + '*': '*'}}{{d[i].buyNumber}}</span><em>￥{{d[i].salePrice}}</em></p>
                        {{# if(d[i].type == null && d[i].status == 'UN_DISTRIBUTE' ){ }}
                        <a href="#"  onclick="cancelStatus({{d[i].id}})" class="button button-link button-fill button-pink pull-right external "  style="margin-top:2%;margin-left:2%">
                            <span class="btn">取消订单</span></a>
                        <a href="#"  onclick="runOwn({{d[i].did}})" class="button button-link button-fill button-cyan pull-right external "  style="margin-top:2%">
                            <span class="btn">开始配送</span></a>

                        {{# } }}
                        {{# if(d[i].type == 'OWN' && d[i].status == 'ROB_DISTRIBUTE' ){ }}
                        <a href="#"  onclick="runOver({{d[i].did}})" class="button button-link button-fill button-pink pull-right external "  style="margin-top:2%">
                            <span class="btn">确认送达</span></a>
                        {{# } }}
                        {{# if(d[i].type == 'OWN' && d[i].status == 'SEND_DISTRIBUTE' ){ }}
                        <a href="#"   class="button button-link button-fill button-pink pull-right external "  style="margin-top:2%">
                            <span class="btn">客户待确认</span></a>
                        {{# } }}


                    </li>
                </ul>
            </div>
        </div>
    {{# } }}
    {{# } }}
</script>

